<?php

	/*
	 * 点评过滤菜单
	 */
?>


<div class="right_bar">

 
 <dl class="cate_box">
    <dt>点评分类</dt>
    <dd><h1><a href="<?php echo edp_href_link(PAGENAME_USER_REVIEW,"uid=$uid");?>">全部</a></h1></dd>
   	<?php
if($pageVars['reviewcategories']){		
				
		$num = 0;
       foreach($pageVars['reviewcategories'] as $id=>$category){
			
			echo '<dd><h1><a href="'.edp_href_link(PAGENAME_USER_REVIEW, "catid=$id&uid=$uid").'">'. $category['name'] .'</a>('.$category['count'].')</h1></dd>';
						 
			 $num++;							 
			 if($num == 5)
			  break;					
		}					
		$totalNum = count($pageVars['reviewcategories']);
		if( $totalNum > $num){
			
			$cateListHidden  = array_slice($pageVars['reviewcategories'],$num, $totalNum - $num, true );
							
			echo '<span id="hiddenCate">';
			
            foreach($cateListHidden as $id=>$category){
				
				echo '<dd><h1><a href="'.edp_href_link(PAGENAME_USER_REVIEW, "catid=$id&uid=$uid").'">'. $category['name'] .'</a>('.$category['count'].')</h1></dd>';
            }
				
			echo '</span>';	
			echo '<span id="btnShowCate" class="mr">显示更多</span>';
		}		

	?>    
  		
 </dl>
 
<?php }	?>	           
       
   <dl class="tag_box">
     <dt>点评标签</dt>
      <dd><h1><a href="<?php echo edp_href_link(PAGENAME_USER_REVIEW,"uid=$uid");?>">全部</a></h1></dd>            	
            
      <?php
	if($pageVars['reviewtags']){				
		$num = 0;
	   foreach($pageVars['reviewtags'] as $tag=>$count){
			
			echo '<dd><h1><a href="'.edp_href_link(PAGENAME_USER_REVIEW, "tag=$tag&uid=$uid").'">'. $tag .'</a>('.$count.')</h1></dd>';
						 
			 $num++;							 
			 if($num == 5)
			  break;					
		}
		
		if(count($pageVars['reviewtags']) > $num){
			
			$tagListHidden  = array_slice($pageVars['reviewtags'],$num);	
							
			echo '<span id="hiddenTag">';
			
            foreach($tagListHidden as $tag=>$count){
				
				echo '<dd><h1><a href="'.edp_href_link(PAGENAME_USER_REVIEW, "tag=$tag&uid=$uid").'">'. $tag .'</a>('.$count.')</h1></dd>';
             }
				
			echo '</span>';	
			echo '<span id="btnShowTag" class="mr">显示更多</span>';
		}				
	?>               
  </dl>
          
 <?php }?>	

          
</div>
